package com.adu.demo.service.Impl;

import java.util.List;
import com.adu.demo.domain.Book;
import com.adu.demo.mapper.BookMapper;
import com.adu.demo.service.IBookService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
                                            
@Service
public class BookService implements IBookService{
    @Autowired
    private BookMapper bookMapper;

    @Override
    public List<Book> getList(Book book){
        return bookMapper.getList(book);
    }
    @Override
    public Book getById(Long id){
        return bookMapper.getById(id);
    }
    @Override
    public int save(Book book){
        return bookMapper.save(book);
    }
    @Override
    public int deleteById(Long id){
        return bookMapper.deleteById(id);
    }
    @Override
    public int deleteByIds(Long[] ids){
        return  bookMapper.deleteByIds(ids);
    }
    @Override
    public int update(Book book){
        return bookMapper.update(book);
    }
}